package teach.aistar.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import teach.aistar.mapper.UserDetailMapper;
import teach.aistar.model.entity.UserDetail;
import teach.aistar.service.IUserDetailService;

import java.util.List;

@Service
@Transactional
public class UserDetailServiceImpl implements IUserDetailService {
    @Autowired
    private UserDetailMapper userDetailMapper;
    @Override
    public List<UserDetail> selectDetailAll() {
        return userDetailMapper.selectDetailAll();
    }

    @Override
    public int deleteByCuId(int id) {
        return userDetailMapper.deleteByCuId(id);
    }


    @Override
    public List<UserDetail> findByConditional(UserDetail userDetail) {
        return userDetailMapper.findByConditional(userDetail);
    }

    @Override
    public int insert(UserDetail userDetail) {
        return userDetailMapper.insert(userDetail);
    }

    @Override
    public UserDetail selectById(int uId){
        return userDetailMapper.selectById(uId);
    }

    @Override
    public int updateCustomer(UserDetail userDetail) {
        return userDetailMapper.updateCustomer(userDetail);
    }

}
